SHELL=/bin/sh
DESTDIR=/usr
BUILDDIR=$(CURDIR)/build

LIBS=libxml++-2.6

MAKE_INHERIT=LIBS="$(LIBS)" DESTDIR="$(DESTDIR)" BUILDDIR="$(BUILDDIR)"

.PHONY: clean install help license uninstall

all:
	@$(SHELL) setup.sh "$(BUILDDIR)" "$(LIBS)"
	@$(MAKE) -C src $(MAKE_INHERIT)
	@$(MAKE) -C misc $(MAKE_INHERIT)
	@echo "Build complete. Run 'make install' to install the framework."
clean:
	@$(MAKE) -C src clean $(MAKE_INHERIT)
	@$(MAKE) -C misc clean $(MAKE_INHERIT)

help:
	@$(SHELL) help.sh README

license:
	@$(SHELL) help.sh LICENSE

install:
	@$(SHELL) install.sh "$(DESTDIR)" "$(BUILDDIR)"

uninstall:
	@$(SHELL) uninstall.sh "$(DESTDIR)"
